#include <stdio.h>
int check(unsigned char data[6]);
int main(int argc, char *argv[])
{
//unsigned char data[6]={0x0c,0x7a,0x9b,0x4c,0xd5,0x74};
	unsigned char data[6]={0x0D,0x00,0x96,0x71,0x8C,0x66};	
	int res = check(data);
	printf("%d\n",res);	
	return 0;

}


int check(unsigned char data[6])
{
	unsigned char out=0x00;
	for(int i=0;i<5;i++)
	{
	printf("------%#x\n",out);
		out^=data[i];
	}
	printf("%#x\n",out);
	if(out==data[5])
	{
		return 1;
	}else{
		return 0;
	}
}
